<!-- templates/login.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    {% load static %}
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login</title>
    <!-- 引入 CSS 文件 -->
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
</head>
<body>
    <div class="container">
        <h1>登录</h1>
        <form method="POST">
            {% csrf_token %}
            <label for="username">账号:</label>
            <input type="text" name="username" required>

            <label for="password">密码:</label>
            <input type="password" name="password" required>

            <button type="submit">登录</button>
        </form>

        {% if error %}
        <p class="error">{{ error }}</p>
        {% endif %}

        <p class="register-link">
            没有账号？<a href="{% url 'register' %}">Register here</a>
        </p>
    </div>
</body>
</html>
